﻿using KAs.Common.Const;
using KAs.SqlSugar.Entity;
using KAs.SqlSugar.Entity.Interface;
using SqlSugar;

namespace RN.Note.Domain;

[SugarTable("rn_readingnote")]
public class ReadingNote : SnowflakeIdEntity, ICreateEntity, IUpdateEntiy, IDeleteEntity
{
    /// <summary>
    /// 书名
    /// </summary>
    [SugarColumn(ColumnDataType = ConstConfig.VARCHAR64)]
    public string Title { get; set; }
    /// <summary>
    /// 封面图片路径
    /// </summary>
    [SugarColumn(ColumnDataType = ConstConfig.VARCHAR128)]
    public string CoverImage { get; set; }
    /// <summary>
    /// 作者
    /// </summary>
    public string Author { get; set; }
    /// <summary>
    /// 标签
    /// </summary>
    [SugarColumn(ColumnDataType = ConstConfig.TEXT, IsJson = true)]
    public List<string> Tags { get; set; }
    /// <summary>
    /// 评分
    /// </summary>
    public double Rate { get; set; }
    /// <summary>
    /// 读完时间
    /// </summary>
    public DateTime ReadedDate { get; set; }
    /// <summary>
    /// 评论
    /// </summary>
    [SugarColumn(ColumnDataType = ConstConfig.VARCHAR1024)]
    public string Note { get; set; }

    public string CreateUid { get; set; }

    [SugarColumn(IsNullable = true)]
    public DateTime? CreateTime { get; set; }

    [SugarColumn(IsNullable = true)]
    public string UpdateUid { get; set; }

    [SugarColumn(IsNullable = true)]
    public DateTime? UpdateTime { get; set; }

    public bool IsDeleted { get; set; }
}
